<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>JS变量</title>

    <script>
        //1、声明一个age变量 在内存开辟空间
        var age;
        //2、赋值 把20赋予age;
        age = 20;
        //3、打印输出
        console.log(age);
        var name = '小明';
        alert(name);
    </script>
</head>

<body>




</body>

</html>